package com.tencent.mlvb.apilive;

import android.app.Application;
import android.util.Log;

import com.tencent.live2.V2TXLiveDef;
import com.tencent.live2.V2TXLivePremier;
import com.tencent.rtmp.TXLiveBase;

public class MApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        String licenceURL = "https://license.vod2.myqcloud.com/license/v2/1343822652_1/v_cube.licens"; // 获取到的 licence url
        String licenceKey = "aac2e5394a4b6f0585f0f0fa8c003e9e"; // 获取到的 licence key
        V2TXLivePremier.setLicence(this, GenerateTestUserSig.LICENSEURL, GenerateTestUserSig.LICENSEURLKEY);
        V2TXLivePremier.setLogConfig(new V2TXLiveDef.V2TXLiveLogConfig());
        V2TXLivePremier.setObserver(new V2TXLivePremier.V2TXLivePremierObserver() {
            @Override
            public void onLicenceLoaded(int result, String reason) {
                Log.i("MApplication", "onLicenceLoaded: result:" + result + ", reason:" + reason);
            }
        });
    }
}
